package com.pzb.wechat.service;

import java.util.List;
import com.pzb.wechat.domain.WechatAddress;

/**
 * 收货地址Service接口
 * 
 * @author Mr_Wu
 * @date 2022-01-21
 */
public interface IWechatAddressService 
{
    /**
     * 查询收货地址
     * 
     * @param id 收货地址主键
     * @return 收货地址
     */
    public WechatAddress selectWechatAddressById(Long id);

    /**
     * 查询收货地址列表
     * 
     * @param
     * @return 收货地址集合
     */
    public List<WechatAddress> selectWechatAddressList(String openid, String extAppid);

    /**
     * 新增收货地址
     * 
     * @param wechatAddress 收货地址
     * @return 结果
     */
    public int insertWechatAddress(WechatAddress wechatAddress);

    /**
     * 修改收货地址
     * 
     * @param wechatAddress 收货地址
     * @return 结果
     */
    public int updateWechatAddress(WechatAddress wechatAddress);

    /**
     * 批量删除收货地址
     * 
     * @param ids 需要删除的收货地址主键集合
     * @return 结果
     */
    public int deleteWechatAddressByIds(Long[] ids);

    /**
     * 删除收货地址信息
     * 
     * @param id 收货地址主键
     * @return 结果
     */
    public int deleteWechatAddressById(Long id);

    Long selectAddressDefaultId(String openid, String extAppid);

    int setAddressIsNotDefault(String openid, String extAppid);

    int setAddressDefault(Long id);

    WechatAddress selectWechatDefaultAddress(String openid, String extAppid);
}
